Backport of pcre2-10.48-Fix-JIT-match-context-reuse.patch
Cherry-pick of
1dcd0cf42a6a7cb62cc9a7c024196733abcfda95 and
1cad831209af67d24298c301a74c615d3a6d57eb
Fix leak & stale PCRE2_MD_COPIED_SUBJECT if pcre2_jit_match used with existing match context (#937)
The problem is not that pcre2_jit_match() needs to add support for PCRE2_COPY_MATCHED_SUBJECT. Instead, if the passed-in context somehow contains a previously-copied subject (by non-JIT matcher using a global or cached subject) then it will be leaked, and worse, incorrectly free'd later.
pcre2test: honor no_jit when used with jitfast (#946)
`pcre2_jit_match()` ignores the PCRE2_NO_JIT option, so teach pcre2test
to avoid calling it if the subject modifier that sets that option is
used together with the option to call it directly.
While at it, make jitverify more reliable and add a unittest to validate
that PCRE2_NO_JIT is ignored in the fast JIt path.
(cherry picked from commit
e5b9232fc4cd6a0df312ae25568e72cd337cafa2)